About 501 letters

About 3 minutes

#oct

Description: Convert an integer to an octal string prefixed with 0o.

def oct(x: int):
    '''
    Convert an integer to an octal string with prefix `0o`

    :param x: An integer
    :return: The octal string representation of x
    '''

Example:

print(oct(0))
print(oct(10))
print(oct(1024))

>>> Establishing WebAssembly Runtime.

>>> Standby.

Powered by Shift.

Updated: 6/9/2025

Author: PlanC

Created: 6/9/2025